home *** CD-ROM | disk | FTP | other *** search
- unit TestMsgU;
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, StdCtrls;
-
- const
- wm_CustomMsg = wm_User + $999;
-
- type
- TForm1 = class(TForm)
- procedure FormCreate(Sender: TObject);
- private
- procedure WMCustomMsg(var Msg: TMessage); message wm_CustomMsg;
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm1.FormCreate(Sender: TObject);
- begin
- PostMessage(Handle, wm_CustomMsg, 0, 0);
- end;
-
- procedure TForm1.WMCustomMsg(var Msg: TMessage);
- begin
- ShowMessage('The form has finished drawing before '#13'this message box was drawn');
- end;
-
- end.
-
-